package lab02.test21;

import java.util.Scanner;

public class Test21 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("enter a String:");

        String string = sc.next();
        //给定一个字符
        char achar = 'a';
        //计算频数
        int count = 0;

        for(int i = 0;i < string.length();i++){

            char temp = string.charAt(i);

            if(temp >= achar){
                count++;
            }else
                continue;
        }

        System.out.println(achar + "的频率是：" + count*0.1/10*string.length());
    }
}
